import Vue from 'vue'
import VueRouter from 'vue-router'
import OrderList from '../views/OrderList.vue'
import UserList from "@/views/UserList.vue";
import AddUserAndOrder from "@/views/AddUserAndOrder.vue";


Vue.use(VueRouter)

const routes = [
  {
    path: '/order',
    name: 'OrderList',
    component: OrderList
  },
  {
    path: '/user',
    name: 'UserList',
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: UserList
  },
  {
    path: '/add',
    name: 'AddUserAndOrder',
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: AddUserAndOrder
  }
]

const router = new VueRouter({
  routes
})

export default router
